package module.edittroop.model.dataObj
{
	import code.obj.IconObj;
	
	public class HeroConfigObj extends IconObj
	{
		public function HeroConfigObj()
		{
			super();
		}
		
//		override public function set serverId(v:int):void{
//			_serverId = v;
//		}
		override public function get iconClassName():String{
			return "MATERIAL_" + serverId + "_ICON";
		}
		
		public var force:int;
		public var lucky:int;
		public var intelligence:int;
		public var forceGrowth:int;
		public var luckyGrowth:int;
		public var intelligenceGrowth:int;
		public var numLimit:int;
		public var skillList:Array;
		/**
		 *[{"force":"150","lucky":"80","name":"科克莱","intelligence":"120","forceGrowth":"100","luckyGrowth":"100","numLimit":"10000","skillList":"55201","id":"10001","intelligenceGrowth":"100"}, 
		 * @param data
		 * @return 
		 * 
		 */
		public static function praseData(data:Object):HeroConfigObj{
			var heroConfigObj:HeroConfigObj = new HeroConfigObj;
			heroConfigObj.serverId = data.serverId;
			heroConfigObj.name = data.name;
			heroConfigObj.force = data.force;
			heroConfigObj.lucky = data.lucky;
			heroConfigObj.intelligence = data.intelligence;
			heroConfigObj.forceGrowth = data.forceGrowth;
			heroConfigObj.luckyGrowth = data.luckyGrowth;
			heroConfigObj.intelligenceGrowth = data.intelligenceGrowth;
			heroConfigObj.numLimit = data.numLimit;
			heroConfigObj.skillList = String(data.skillList).split(",");
			return heroConfigObj;
		}
	}
}